/**************************************************************
 **************************************************************
 
 This is the low-level CF card accessing unit. 
 Created on 2006-12-20 By ZZP
 **************************************************************
 **************************************************************/
 
/**************************************************************
 **************************************************************
 Revision history:

 2007.9.14: Added to L0505Mxx project.
            Rename access resisters.
 
 **************************************************************
 **************************************************************/
#include "DSP281x_Device.h"

//Local variables
volatile Uns CF_Err, CF_ErrCode;
volatile Uns CFTm;


//CF Card local variables
Uns RDYTimeOutF, BUSYTimeOutF, DRQTimeOutF;

///////////////////////////////////////////
////////      Local functions    //////////
///////////////////////////////////////////
void CF_CheckReadyStatus(void);
void CF_CheckBusyStatus(void);
void CF_CheckDrqStatus(void);
void CF_CheckErrorStatus(void);
void CF_IssueCommand(unsigned long PhysicalSec,Uns SecCnt,Uns Cmd);
void CF_InitParam(void);


//////////////////////////////////////
//    Function realizations
//////////////////////////////////////
//This Function should be realized in MainUnit.c
/*Uns CF_Present(void)
{
  unsigned int temp;  
  
  temp = GpioDataRegs.GPBDAT.all & 0x03;
  if (!temp)
    return (1);
    
  return(0);
}*/

void IncCfTmVarsBy1ms(void)
{
 
}


void CF_InitVar(void)
{
  
}


//#pragma CODE_SECTION(ReadCF2Usb, "FuncsMap2H0SARam")
void ReadCF2Usb(LgUns PhysicalSec, Uns SecCnt)
{
  
}


void ReadCF(Uns *Dest, LgUns PhysicalSec, Uns SecCnt)
{
  
}

//#pragma CODE_SECTION(WriteCF, "FuncsMap2H0SARam")
void WriteCF(Uns *Src, LgUns PhysicalSec, Uns SecCnt)
{
  
}


void CF_HardwareReset(void)
{
  
}

void CF_IdentifyDrive(Uns *Buf, DISK_INFO *pInfo)
{
  
}

//#pragma CODE_SECTION(CF_CheckReadyStatus, "FuncsMap2H0SARam")
void CF_CheckReadyStatus(void)
{
  
}
//#pragma CODE_SECTION(CF_CheckBusyStatus, "FuncsMap2H0SARam")
void CF_CheckBusyStatus(void)
{
  
}
//#pragma CODE_SECTION(CF_CheckDrqStatus, "FuncsMap2H0SARam")
void CF_CheckDrqStatus(void)
{
 
}

void CF_CheckErrorStatus(void)
{

}
//#pragma CODE_SECTION(CF_IssueCommand, "FuncsMap2H0SARam")
void CF_IssueCommand(unsigned long PhysicalSec, unsigned int SecCnt, unsigned int Command)
{
  
}

void CF_InitParam(void)
{  
  
}



